import React from 'react'
import { Card, WingBlank, WhiteSpace } from 'antd-mobile';

class UserCard extends React.Component {

    render() {
        console.log(this.props.userList)
        return (
            <WingBlank>
                <WhiteSpace />
                {
                    this.props.userList.map((item) => {
                        return item.avatar?<Card key={item._id}>
                            <Card.Header
                                title={item.user}
                                thumb={require(`../img/${item.avatar}.png`)}
                                extra={<span>{item.title}</span>}
                            />
                            <Card.Body>
                                {item.type=='boss'?<div>公司:{item.company}</div>:null} 
                                <div>{item.desc}</div>
                                {item.type=='boss'?<div>薪资:{item.money}</div> : null}
                            </Card.Body>
                            <Card.Footer content="footer content" extra={<div>extra footer content</div>} />
                        </Card>:null
                    })
                }
                <WhiteSpace />
            </WingBlank>
        )
    }

}

export default UserCard